﻿<div class="content-part-grid">
    <div class="btn-group" role="group" aria-label="grid">
        <button type="button" class="btn btn-default" ng-click="byname()" ng-class="{true: 'active', false: 'inactive'}[nameIsActive]"
            ng-show="checkedname">文件名称
            <span>{{label4name}}</span>
        </button>
        <button type="button" class="btn btn-default" ng-click="bycreator()" ng-class="{true: 'active', false: 'inactive'}[creatorIsActive]"
            ng-show="checkedcreator">创建人
            <span>{{label4creator}}</span>
        </button>
        <button type="button" class="btn btn-default" ng-click="bycreationdate()" ng-class="{true: 'active', false: 'inactive'}[creationdateIsActive]"
            ng-show="checkedcdate">创建日期
            <span>{{label4creationdate}}</span>
        </button>
    </div>
    <br />
    <br />
    <div class="thumbnail-box" align="center">
        <div class="thumbnail" ng-repeat="list in data | filterBy:['properties.name']: fileName | filterBy:['properties.creator']: creator | filterBy:['properties.creationdate']:createdDate | orderBy:orderby:orderflag">
            <div class="thumbnail-img">
                <a ng-if="list.type=='PdmFolder'">
                    <img class="img-responsive" ng-click="subfolder(list)" src="images/folder-thumbnail.png" />
                </a>
                <!--//图片  可直接预览图片-->
                <a ng-if="list.properties.filetype=='png'||list.properties.filetype=='jpg'||list.properties.filetype=='jpeg'||list.properties.filetype=='gif'"
                    ng-click="openImg()" target="_blank">
                    <img class="image img-responsive" ng-src="{{list.properties.linkurl}}" ng-click="openImg()" />
                </a>
                <!--//非图片 非视频 非PDF-->
                <a ng-if="list.type!='PdmFolder' && list.properties.filetype!=='pdf' && list.properties.filetype!=='mp4'&&list.properties.filetype!=='png'&&list.properties.filetype!=='jpg'&&list.properties.filetype!=='jpeg'&&list.properties.filetype!=='gif'"
                    ng-href="{{list.properties.linkurl}}" ng-click="subfolder(list)" target="_blank">
                    <img class="img-responsive" ng-src="{{list.properties.thumburl}}" />
                </a>
                <!--//视频-->
                <a ng-if="list.type!='PdmFolder' && list.properties.filetype=='mp4'" ng-href="{{list.properties.linkurl}}" ng-click="subfolder(list)"
                    target="_blank">
                    <img class="img-responsive" ng-src="{{list.properties.thumburl}}" />
                </a>
                <!--//pdf-->
                <a ng-if="list.type!='PdmFolder' && list.properties.filetype=='pdf'" ng-click="openPDF(list)" target="_blank">
                    <img class="img-responsive" ng-src="{{list.properties.thumburl}}" />
                </a>
                <div class="thumbnail-btn">
                    <!-- <div class="btn-group pc">
                        <button class="btn btn-default dropdown-toggle" ng-click="clickLabelBtn(list)" data-toggle="dropdown" aria-haspopup="true"
                            aria-expanded="false" title="添加标签">
                            <span class="glyphicon glyphicon-tag"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <li ng-repeat="tag in list.tags">
                                <a ng-click="removeFavorite($index)">
                                    {{tag}}
                                    <span ng-if="tempList.tags!=null" class="glyphicon glyphicon-star" style="display:inline-block;float:right;"></span>
                                </a>
                            </li>
                            <li role="separator" class="divider"></li>
                            <li ng-repeat="tempLabel in tempLabels">
                                <a ng-click="addFavorite($index)">
                                    {{tempLabel}}
                                </a>
                            </li>
                        </ul>
                    </div> -->
                    &nbsp;
                    <button class="btn btn-default" ng-if="list.type==meta.metaclass.PdmFolder" ng-click="downfolder(list.id)">
                        <span class="glyphicon glyphicon-download-alt"></span>
                        <span class="pc"> 下载</span>
                    </button>
                    <a class="btn btn-default" ng-if="list.type=='PDMDOCUMENTREV'" ng-href="{{list.properties.downurl}}" target="_blank">
                        <span class="glyphicon glyphicon-download-alt"></span>
                        <span class="pc"> 下载</span>
                    </a>
                    <button class="btn btn-default" data-toggle="modal" data-target="#edit" ng-click="openDetails(list)" title="点击查看详情">
                        <span class="glyphicon glyphicon-exclamation-sign"></span>
                        <span class="pc"> 详情</span>
                    </button>
                </div>
            </div>
            <div class="thumbnail-info">
                <h5 class="text-nowrap">
                    <a ng-href="{{list.properties.linkurl}}" ng-click="subfolder(list)" target="_blank">
                        {{list.properties.name}}
                    </a>
                </h5>
            </div>
        </div>
    </div>
</div>